<%--
  Created by IntelliJ IDEA.
  User: Calvin
  Date: 12/1/12
  Time: 7:42 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
    <script type="text/javascript">
        function validasi() {
            var nama = document.getElementById("CatName").value;

            if (nama == "" || nama == null) {
                err.innerHTML = "Please insert category name!";
                return false;

            }

            else {
                return true;
            }
        }

    </script>
</head>
<body>
<div id="popup-header">
    <h2>Add New Category</h2>
</div>
<form action="saveNewCat.jsp" onsubmit="return validasi()">

    <div class="txt-fld" id="word1">
        <label style="padding-top: 10px;">Category Name : </label>
        <input style="margin-top: 10px; font-family: Segoe UI ; font-size: 12pt"
               type="text" name="CatName" id="CatName">

    </div>
    <div id="err">

    </div>

    <div class="btn-fld">
        <button type="submit">Save</button>
    </div>


</form>

</body>
</html>